##################################################################
# /* Author: Gautam Nair and Nicholas Sambanis */
# /* Violence Exposure and Ethnic Identification: Evidence from Kashmir */
# /* Set working directory and run analysis */

##################################################################

# change working directory here
setwd("")

# note the following packages are needed

#install.packages("Hmisc")
#install.packages("foreign")
#install.packages("sandwich")
#install.packages("lmtest")
#install.packages("numDeriv")
#install.packages("stargazer")
#install.packages("ggplot2")
#install.packages("plyr")
#install.packages("gridExtra")
#install.packages("dplyr")
#install.packages("scales")
#install.packages("ri")

# to generate tables and figures run the following code

source("code_01_t_01_design.r")
source("code_02_t_02_sample_characteristics.r")
source("code_03_f_01_violence_id_correlation.r")
source("code_04_t_03_ate_violence.r")
source("code_05_t_04_violence_het_effects.r")
source("code_06_t_05_ate_status_int_inst_geo.r")
source("code_07_t_06_f_02_india_growth_kashmir_casualties.r")
source("code_08_t_07_t_10_violence_id_correlation_tables.r")
source("code_09_t_11_identification_preferences_correlation.r")
source("code_10_t_12_refusal_rates.r")
source("code_11_f_08_het_effects_education_figures.r")
source("code_12_f_09_het_effects_constituency_figures.r")
source("code_13_t_13_t_14_bh_correction.r")
source("code_14_t_15_violence_protests_het_effects.r")
source("code_15_t_16_violence_het_effects_pca.r")
source("code_16_t_17_violence_het_effects_z_index.r")
source("code_17_t_18_violence_het_effects_id_only.r")
source("code_18_t_19_ate_all_groups_separate.r")
source("code_19_t_20_power_analysis.r")






